Currently, Network Address Translation (NAT) in the related art is one of the Wide Area Network (WAN) access technologies. The NAT is a translation technology for translating a private (reserved) address into a legal Internet Protocol (IP) address, and is widely applied to various types of internet access modes and various types of networks. The NAT can solve the problem of IP address exhaustion.
With the exhaustion of Internet Protocol Version 4 (IPv4) address resources, service providers urgently need to solve the problem of address resource exhaustion. Address Plus Port (A+P) is a practical technology for solving the address exhaustion. Network elements deployed using the A+P can be divided into server-end devices (such as a Provider Edge (PE) router device) and Customer Premise Equipment (CPE).
Typical CPE may include, but is not limited to hardware devices such as a Small Office/Home Office (SOHO) router, a Digital Subscriber Line (DSL) modem gateway, an Internet Protocol Television (IPTV) set top box, a home safety gateway and so on, and certainly, the typical CPE may be embedded to a terminal by serving as a component of software.
Typical server-end devices may include, but are not limited to: a service router, a broadband access server, a firewall, a wireless core gateway namely a Gateway General Packet Radio Service (GPRS) Support Node (GGSN)/Packet Data Network Gateway (PGW), and the like.
An A+P technology principle is simply introduced below.
The A+P technology principle refers to that:
The server-end device allocates for the CPE an address and a port range resource for the NAT. The port range resource is a public network address and port resource pool for performing an NAT function via the CPE.
Flow from a private network of a user to a WAN needs to be subjected to NAT translation on the CPE. Specifically, a public network address and a port are acquired from the port range resource, a source address and source port of the flow of the private network are translated into the acquired public network address and port, and a mapping table is generated. Due to the fact that messages translated on the CPE may adopt the same public network IP address, it is necessary to perform tunnel encapsulation processing to the flow on the CPE before the flow is forwarded to the server-end device, so as to prevent a conflict when the message is forwarded by an access network. Then, after the server-end device performs de-encapsulation processing, the flow is forwarded to the WAN.
A destination address and a destination port of return flow from the WAN to the user subsequently are the public network address and the public network port translated on the CPE. When reaching the server-end device, the return flow can be forwarded according to the destination address and the destination port in the message. After an encapsulation tunnel is found, the flow can be forwarded to the CPE through the tunnel encapsulation. Tunnel de-encapsulation processing is performed on the CPE, then the destination address and destination port of the flow are translated into a private network address and a private network port according to the generated mapping table, and the address-translated flow is forwarded to a user terminal finally.
In addition, the A+P technology also adopts a core idea of a Carrier Grade NAT (CGN) principle. However, different from a mainstream CGN solution, the A+P technology transfers a CGN function to the CPE of the user. A CGN device is a user access device of the service provider, and it manages a huge number of user mapping table entries and queries the mapping table to perform message translation during forwarding. In this case, the CGN device becomes a bottleneck of user flow forwarding of the service provider. By means of the A+P technology, the CGN device no longer generates the mapping table and performs message translation, so that the running burden on the CGN device is alleviated, so that the CGN device can more easily forward the flow.
However, according to an A+P solution adopted in the related art, the port range resource needs to be allocated to the CPE firstly, and may be allocated via one of the following modes in the related arts which are described in detail as follows.
In a first allocation mode, when the CPE allocates the address according to a Dynamic Host Configuration Protocol (DHCP), the port range resource may be allocated via a DHCP option.
In a second allocation mode, when the CPE performs accessing via a Point to Point Protocol over Ethernet (PPPoE), the port range resource may be allocated via an IP Control Protocol (IPCP) option.
In a third allocation mode, when the CPE allocates the address via a Dynamic Host Configuration Protocol Version 6 (DHCPv6), the port range resource may be allocated via a DHCPv6 option.
A Neighbour Discovery Protocol (NDP) is a key protocol of an Internet Protocol Version 6 (IPv6), and is also an upgrade and improvement of the integration of certain protocols of the IPv4 and the IPv6, such as an Address Resolution Protocol (ARP), Internet Control Message Protocol (ICMP) router discovery and ICMP reorientation. The NDP specifically includes: prefix discovery, neighbour unreachability monitoring, duplication address monitoring, automatic address configuration and the like.
A Neighbour Discovery (ND) message contains an option field which can be filled with one or more options. For example, when automatic address configuration is performed, a Domain Name System (DNS) server address is issued via an ND option. ND also defines some standard options, and private options may also be defined as needed to expand functions of the ND, therefore, it can be seen that the ND has a good expansibility.
In spite of this, when the CPE performs stateless configuration of an IPv6 address via the NDP, there lacks a relevant mechanism for allocating the port range resource.